Communication apparatus, communication method, and program

ABSTRACT

A communication device includes a first processing unit that sends a first command to start an activation processing. The communication device also includes a second processing unit that receives the first command from the first processing unit. In addition, the communication device includes an interface between the first processing unit and the second processing unit. The first processing unit activates the interface at a predetermined interface level from among a plurality of interface levels. The second processing unit starts an application in accordance with the activated interface level. The first processing unit and the second processing unit exchange data by the activated application. The first processing unit and the second processing unit perform a deactivation processing of the activated interface.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of application Ser. No. 15/385,337,filed Dec. 20, 2016, currently pending, which is a continuation of andclaims the benefit of priority under 35 U.S.C. § 120 to application Ser.No. 13/301,282, filed on Nov. 21, 2011, now U.S. Pat. No. 9,571,997,which claims the benefit of priority under 35 U.S.C. § 119 from JapanesePriority Patent Application JP 2010-264715 filed in the Japan PatentOffice on Nov. 29, 2010, the entire contents of all of which are herebyincorporated by reference.

FIELD

The present disclosure relates to a communication apparatus, acommunication method, and a program, and particularly to a communicationapparatus, a communication method and a program by each of which it ispossible to provide an interface which can be compatible with a case inwhich a plurality of types of targets and protocols are detected.

BACKGROUND

A near field communication system for performing wireless communicationat close range in a non-contact manner with the use of an IC (IntegratedCircuit) card is in widespread use. For example, the usage thereof as anelectronic travel ticket and electronic money is well known. Inaddition, recently, a mobile phone with a function as an electronictravel ticket and electronic money by non-contact wireless communicationhas been becoming widespread.

The near field wireless communication system has rapidly becomewidespread worldwide and recognized as an international standard.Examples of the international standard include ISO/IEC 14443 as thestandard of a proximity type IC card system, ISO/IEC 18092 as thestandard of NFCIP (Near Field Communication Interface and Protocol)-1,and the like.

In the near field wireless communication based on ISO/IEC 18092, thereare an active communication mode and a passive communication mode. Theactive communication mode is a communication mode in which datatransmission is performed by outputting electromagnetic waves from eachof a plurality of communication apparatuses exchanging data andmodulating a respective electromagnetic wave. In the passivecommunication mode, data transmission is performed by outputting anelectromagnetic wave from one (initiator) of the plurality ofcommunication apparatuses and modulating the electromagnetic wave. Theother communication apparatuses (targets) of the plurality ofcommunication apparatuses send data by performing load modulation on theelectromagnetic wave output from the initiator.

In the passive communication mode of ISO/IEC 18092 (hereinafter,referred to as type F), data encoding by Manchester coding is performedfor the data transmission between a reader writer and an IC card. Inaddition, 212 kbps and 424 kbps (kilobit per second) are employed asdata communication rates in the type F. The FeliCa (registeredtrademark) scheme by the applicant, Sony Corporation, corresponds to thetype F.

In addition, there are various communication schemes, for example,called type A and type B in the IC card system based on ISO/IEC 14443.

The type A is employed as the MIFARE (registered trademark) byKoninklijke Philips Electronics N.V. In the type A, the data encoding byMiller coding is performed for the data transmission from the readerwriter to the IC card while the data encoding by Manchester coding isperformed for the data transmission from the IC card to the readerwriter. In addition, 106 to 847 kbps (kilobit per second) is employed asthe data communication rate in the type A.

In the type B, the data encoding by NRZ encoding is performed for thedata transmission from the reader writer to the IC card while the dataencoding by NRZ-L is performed for the data transmission from the ICcard to the reader writer. In addition, 106 kbps is employed as the datacommunication rate in the type B.

The communication apparatus for the near field wireless communicationbased on ISO/IEC 18092 or ISO/IEC 14443 is referred to as an NFC deviceherein below. There are definitions of the protocol and the command tobe exchanged between a CLF (Contactless Front end) and an AP(Application Processor) while the NFC device is functionally dividedinto the CLF and the AP (see JP-T-2009-515250). The CLF mainly performstransceiving of the RF data with a target (a PICC (IC card) of ISO/IEC14443 or target of ISO/IEC 18092) while the AP mainly executes anapplication and performs overall control of the NFC device.

SUMMARY

However, JP-T-2009-515250 assumes only a case in which one kind oftarget and protocol are detected from among the type A and the type B ofISO/IEC 14443 and the type F of ISO/IEC 18092. In other words,JP-B-2009-515250 discloses an interface including the CLF and the AP onthe assumption that only one kind of target and protocol is detected.For this reason, the interface is not for the case in which a pluralityof kinds of targets and protocols are detected, and an interfaceincluding the CLF and the AP which can be compatible with a plurality ofkinds of targets and the protocols is desired.

Thus, it is desirable to provide an interface which can be compatiblewith a case in which a plurality of kinds of targets and protocols aredetected.

In one embodiment, a communication device includes a first processingunit configured to send a first command to start an activationprocessing. The communication device includes a second processing unitconfigured to receive the first command from the first processing unit.The communication device also includes an interface between the firstprocessing unit and the second processing unit. The first processingunit is configured to activate the interface at a predeterminedinterface level from among a plurality of interface levels the secondprocessing unit is configured to start an application in accordance withthe activated interface level. The first processing unit and the secondprocessing unit are further configured to exchange data by the activatedapplication. The first processing unit and the second processing unitare further configured to perform a deactivation processing of theactivated interface.

The first processing unit can be configured to send a second command foran initialization to the second processing unit, the second commandidentifying an interface level for an RF protocol supported by the firstprocessing unit.

The second processing unit can be configured to send a third command forsetting an interface level to the first processing unit in response tothe second command, the third command associating an RF protocol and aninterface level based on the interface level included in the secondcommand.

The first processing unit can be configured to send a plurality ofcommands, each of the plurality of commands indicating an RF technology.The first processing unit can be configured to receive a response to oneof the plurality of commands from a target.

The first processing unit can be configured to send a fourth command fora discovery notification to the second processing unit in response tothe response received from the target, the fourth command including anidentifier of the target and an RF technology.

The second processing unit can be configured to send a fifth command fora discovery selection to the first processing unit in response to thefourth command. The first processing unit can be configured tocommunicate with the target in response to the fifth command, to receivea sixth command from the target after communicating with the target, andto send the first command to the second processing unit in response tothe sixth command, the first command indicating the target and an RFprotocol.

The first processing unit and the second processing unit can beconfigured to perform the deactivation processing by the secondprocessing unit sending an eighth command for a deactivation to thefirst processing unit after the data is exchanged and the activatedapplication is completed, the eighth command identifying the target, andthe first processing unit deactivating the interface after receiving theeighth command.

The first processing unit can be configured to receive a fourth commandfrom a target after receiving the third command, to send a fifth commandto the target in response to the fourth command, and to receive a sixthcommand from the target in response to the fifth command.

The first processing unit can be configured to send the first command tothe second processing unit in response to the sixth command, the firstcommand including an identifier of the target and an RF technology.

The first processing unit can be configured to receive a seventh commandfrom the target after the data is exchanged and to deactivate theinterface in response to the seventh command.

The first processing unit can be configured to send an eighth commandfor a deactivation notification to the second processing unit inresponse to the seventh command, the eighth command including anidentifier of the target and the seventh command. The second processingunit can be configured to complete the application in response to theeighth command.

The first processing unit can be configured to activate the interface atthe predetermined interface level by sending a second command forpolling, receiving a response to the second command from a target,sending a third command to the second processing unit, and receiving afourth command for a selection after the response to the second command.

The first processing unit and the second processing unit can beconfigured to exchange the data by the second processing unit exchangingthe data with the target through the first processing unit.

The first processing unit and the second processing unit can beconfigured to perform the deactivation processing by the secondprocessing unit sending a fifth command for completing a data exchangeto the first processing unit, the first processing unit deactivating theinterface in response to the fifth command and disconnecting acommunication link with the target in response to the fifth command.

The first processing unit can be configured to activate the interface atthe predetermined interface level by receiving a second command from atarget, sending a third command to the target in response to the secondcommand, and receiving an indication of an RF technology in response tothe third command.

The first processing unit and the second processing unit can beconfigured to perform the deactivation processing by the firstprocessing unit sending a fourth command for a deactivation notificationto the second processing unit after a disconnection of a communicationlink with the target and the second processing unit completing theapplication in response to the fourth command.

The second processing unit can be configured to start the application inaccordance with the activated interface level in response to the firstcommand.

In another embodiment, a communication device includes first processingmeans for sending a command to start an activation processing. Thecommunication device also includes second processing means for receivingthe command from the first processing means. Further, the communicationdevice includes an interface between the first processing means and thesecond processing means. The first processing means activates theinterface at a predetermined interface level from among a plurality ofinterface levels. The second processing means starts an application inaccordance with the activated interface level. The first processingmeans and the second processing means exchange data by the activatedapplication. The first processing means and the second processing meansperform a deactivation processing of the activated interface.

In yet another embodiment, a computer-readable storage medium is encodedwith computer executable instructions. The instructions, when executedby a communication device, cause the communication device to perform amethod including sending a command from a first processing unit to asecond processing unit to start an activation processing. The methodalso includes receiving the command at the second processing unit andactivating an interface at a predetermined interface level from among aplurality of interface levels with the first processing unit. Further,the method includes starting an application with the second processingunit in accordance with the activated interface level and exchangingdata by the activated application with the first processing unit and thesecond processing unit. The method additionally includes performing adeactivation processing of the activated interface with the firstprocessing unit and the second processing unit.

According to the embodiments of the present disclosure, it is possibleto provide an interface which can be compatible with a case in which aplurality of kinds of targets and protocols are detected.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram showing a configuration example of anembodiment of a communication system to which the present disclosure isapplied;

FIG. 2 is a diagram showing an interface level settable for each RFprotocol;

FIG. 3 is a diagram showing a difference in processing in accordancewith an interface level in the case of a communication layer for P2Pcommunication between NFC devices;

FIG. 4 is a diagram illustrating a detailed format of each message;

FIG. 5 is a diagram illustrating a detailed format of each message;

FIG. 6 is a diagram illustrating a detailed format of each message;

FIG. 7 is a diagram illustrating a detailed format of each message;

FIG. 8 is a diagram illustrating a detailed format of each message;

FIG. 9 is a diagram illustrating a detailed format of each message;

FIG. 10 is a diagram showing a list of messages;

FIG. 11 is a flowchart illustrating a sequence outline;

FIG. 12 is a diagram illustrating a detailed sequence example in thecase of a Poll Mode;

FIG. 13 is a flowchart illustrating a detailed sequence example in thecase of a Poll Mode;

FIG. 14 is a flowchart illustrating a detailed sequence example in thecase of a Listen Mode; and

FIG. 15 is a flowchart illustrating a detailed sequence example in thecase of a Listen Mode.

DETAILED DESCRIPTION

[Configuration Example of Communication System to which PresentDisclosure is Applied]

FIG. 1 shows a configuration example of a communication system accordingto an embodiment to which the present disclosure is applied.

The communication system in FIG. 1 includes an NFC device 1 and NFCdevices 11-1 to 11-3.

The NFC device 1 and the NFC devices 11-1 to 11-3 are communicationapparatuses for near field wireless communication based on one or bothof ISO/IEC 18092 and ISO/IEC 14443. The NFC device 1 and the NFC devices11-1 to 11-3 can be operated as either of a polling device and alistening device.

The polling device forms a so-called RF (Radio Frequency) field(magnetic field) by generating an electromagnetic wave, sends a pollingcommand to detect a listening device as a target, and waits for theresponse from the listening device. In other words, the polling deviceperforms an operation of a PCD (Proximity Coupling Device) of ISO/IEC14443 or an operation of an initiator in the passive mode of ISO/IEC18092.

The listening device receives a polling command which is sent from thepolling device by forming the RF field and then responds with a pollingresponse. In other words, the listening device performs the operation ofPICC of ISO/IEC 14443 or the operation of the target of ISO/IEC 18092.

Accordingly, the NFC device 1 and the NFC devices 11-1 to 11-3 may havethe same hardware configurations, respectively.

The NFC devices 11-1 to 11-3 are respectively referred to as targets11-1 to 11-3 hereinbelow to simplify the difference between the NFCdevice 1 and the NFC devices 11-1 to 11-3. In addition, when it is notparticularly necessary to distinguish the targets 11-1 to 11-3, thetargets 11-1 to 11-3 are simply referred to as a target 11 (or an NFCdevice 11).

The NFC device 1 includes one AP (Application Processor) 21, one CLF(Contactless Front end) 22, and 0 or more SEs (Secure Element) 23. Since0 or more SEs 23 are provided, the number thereof may be 0 (the SE 23may be omitted).

The AP 21 performs overall control of the NFC device 1, generates acommand (CMD) for controlling the CLF 22, and analyzes an executionresult with respect to the command. The AP is an example of a processingmeans. The AP 21 exchanges a message with the CLF 22 in accordance withthe HCI (Host Controller Interface). In addition, the AP 21 executes anapplication for data exchange with the target 11. Examples of theapplication include an application which performs data exchangeprocessing for name cards and an address book in the P2P (Peer-to-Peer)communication, electronic money payment processing, and the like betweena reader writer and an IC card. In addition, the AP 21 stores thereinthree applications App (H), App (M), and App (L) with different levelsas the applications for data exchange in accordance with the level ofthe interface of the CLF 22 (interface level).

Thus, the CLF 22 includes a memory. The memory can also be external tothe CLF 22. The memory can be a ROM, a RAM, a magnetic disk, an opticaldisk, or any other memory.

Further, the memory is an example of a storing means. When the APexecutes a program to perform a method according to some embodiments,the memory is an example of anon-transitory storage medium.

The CLF 22 is an interface which is disposed between the AP 21 and thetarget 11 to mediate therebetween and controls the path such that the AP21 and the SE 23 can exchange data with the target 11. The CLF is anexample of a processing means. The CLF 22 has a plurality of interfacelevels as the interface level for mediating the AP 21 and the target 11.In this embodiment, the CLF 22 is assumed to have three stages ofinterface levels including a low level, a middle level, and a highlevel. The CLF 22 is instructed by the HCI and exchanges messages withthe AP 21 and performs transceiving of RF data through an antenna 24based on a command (CMD) from the AP 21.

The HCI is a logical interface between the AP 21 and the CLF 22, and acommand (CMD) and a notification (NTF) in a predetermined format whichwill be described later are defined in the HCI.

The SE 23 performs processing and retaining of secure data from amongthe processing which are necessary for the data exchange between the NFCdevice 1 and the target 11. In the example of FIG. 1, three SEs 23-1 to23-3 are provided in the NFC device 1. The SEs 23-1 and 23-2 areconnected to the CLF 22 to perform retaining and processing of securedata which is treated by the CLF 22 while the SE 23-3 is connected tothe AP 21 to perform retaining and processing of secure data which istreated by the AP 21. It is possible to provide a necessary number ofSEs 23 in the NFC device 1 or omit the SEs 23 if it is not necessary.

The antenna 24 constitutes a closed-loop coil and outputs anelectromagnetic wave (RF data) if the current flowing through the coilchanges. The antenna is an example of a transmitting means and/or areceiving means.

The NFC device 1 configured as described above supports one or more ofthe following three RF technologies.

(1) NFC-A . . . Type A communication scheme of ISO/IEC 14443

(2) NFC-B . . . Type B communication scheme of ISO/IEC 14443

(3) NFC-F . . . 212 kbps and 424 kbps communication schemes of ISO/IEC18092

The NFC-A is an abbreviated expression of Type A of ISO/IEC 14443, theNFC-B is an abbreviated expression of Type B of ISO/IEC 14443, and theNFC-F is an abbreviated expression of 212 kbps and 424 kbpscommunication schemes of ISO/IEC 18092, in this specification.

In addition, the NFC device 1 supports one or more of the following sixRF protocols.

(1) T1T . . . TYPE 1 TAG PLATFORM Protocol (based on Type NFC-A)

(2) T2T . . . TYPE 2 TAG PLATFORM Protocol (based on Type NFC-A)

(3) T3T . . . TYPE 3 TAG PLATFORM Protocol (based on Type NFC-F)

(4) ISO-DEP . . . ISO-DEP Protocol (ISO/IEC 14443-4 based on Type NFC-Aor NFC-B)

/TYPE 4 TAG PLATFORM Protocol (based on Type NFC-A or NFC-B)

(5) NFC-DEP . . . NFC-DEP Protocol (ISO/IEC 18092 transport protocolbased on NFC-A or NFC-F)

(6) Prop . . . Proprietary Definition Protocol (Proprietary Protocol)

The T1T is an abbreviated expression of TYPE 1 TAG PLATFORM Protocol(based on NFC-A), and the T2T is an abbreviated expression of TYPE 2 TAGPLATFORM Protocol (based on NFC-A), in this specification. The same istrue for the T3T, the ISO-DEP, the NFC-DEP, and the Prop.

[Concerning Interface Level]

When the NFC device 1 exchanges data with the target 11, the NFC device1 can allot processing to the AP 21 and the CLF 22. In other words, itis possible to cause the intermediate CLF 22 to perform processing whichis necessary for the data exchange with the target 11 instead of the AP21. At this time, to which level the CLF 22 performs the processingnecessary for the data exchange instead is determined based on theinterface level designated (notified) from the AP 21 to the CLF 22.

From among the three stages of interface levels including a low level, amiddle level, and a high level of the CLF 22, the high level is a levelat which the amount of processing allotted to the CLF 22 as an interfaceis the largest, and the low level is a level at which the amount ofprocessing allotted to the CLF 22 as an interface is the smallest. It isnecessary to set the interface level for each RF protocol, and asettable interface level is set in advance depending on the RF protocolin the CLF 22.

FIG. 2 shows the interface level which can be set for the RF protocol bythe CLF 22.

Only a low interface level can be set for each of the RF protocols T1T,T2T, and T3T. In addition, the RF technology when the RF protocol is Illand T2T is NFC-A, and the RF technology when the RF protocol is T3T isNFC-F.

It is possible to set any of the interface levels from among the lowlevel, the middle level, and the high level for each of the RF protocolsISO-DEP and NFC-DEP. The RF technology when the RF protocol is ISO-DEPis NFC-A or NFC-B, and the RF technology when the RF protocol is NFC-DEPis NFC-A or NFC-F.

Only the low interface level can be set for the RF protocol Prop.

FIG. 3 shows a difference in processing depending on the interface levelin the case of a communication layer for the P2P communication betweenNFC devices.

At the low interface level, the CLF 22 has functions of Frame format,Anticollision, Bit coding, and Modulation/Load modulation based onISO/IEC 18092. At the middle interface level, the CLF 22 further hasfunctions up to a transport protocol based on ISO/IEC 18092. That is,the CLF 22 further has functions of Protocol activation/deactivation,Segmentation and reassembly, and Retransmission as well as the functionsat the low level. At the high interface level, the CLF 22 has functionsup to LLCP (NFC Forum. Logical Link Control Protocol) which is a higherlayer protocol of transport protocol based on ISO/IEC 18092.

It is possible to set and mount the interface level of the CLF 22 foreach RF protocol from among the three stages in accordance with theapplication conditions, the costs of the IC chips, and the like whichare assumed by the CLF 22.

In initial processing, the CLF 22 notifies the AP 21 of the informationregarding up to which interface level the CLF 22 itself supports. The AP21 grasps the interface level supported by the CLF 22, selects anoptimal interface level from among the interface levels supported by theCLF 22 in accordance with the application conditions assumed by the AP21, and designates the interface level for the CLF 22. When the CLF 22supports all interface levels, the AP 21 can select an optimal interfacelevel in accordance with the processing supported by the application.For example, when it is desired that the AP 21 executes an applicationwith less processing, the AP 21 may select and designate the highinterface level for the CLF 22.

[Message Format]

Next, detailed description will be made of a message defined as an HCIwith reference to FIGS. 4 to 9.

There are three kinds of messages including a CMD (command) from the AP21 to the CLF 22, an RSP (response) from the CLF 22 to the AP 21 for thecommand, and an NTF (notification) from the CLF 22 to the AP 21.

FIG. 4 shows formats for an initialization command “INIT_COM” and aninitialization response “INIT_RES”.

The initialization command “INIT_COM” is a message for initialization ofthe HCI and the ability exchange between the CLF 22 and the AP 21. Theinitialization command “INIT_COM” includes “Version” representing theHCI version (version number) of the AP 21 and “HCI Features”representing the ability of the AP 21 as parameters. The informationregarding the communication control functions supported by the AP 21such as information regarding the presence of a flow control function, acard emulation function, an additional message creation function, andthe like is input in “HCI Features”.

The initialization response “INIT_RES” is a message for responding tothe initialization command. The initialization response “INIT_RES”includes “Status” representing the response result for theinitialization command “INIT_COM”, “Version” representing the HCIversion of the CLF 22, “HCI Features” representing the ability of theCLF 22, and “HCI Interfaces” representing the interface ability of theCLF 22 as parameters. The information regarding the communicationcontrol functions supported by the CLF 22 such as information regardingthe presence of a flow control function, a battery OFF mode function, arouting function with the use of an application identifier of cardemulation, and the like is input in “HCI Features”. The interface levelfor each RF protocol supported by the CLF 22 is input in “HCIInterfaces”.

The AP 21 and the CLF 22 mutually check the versions thereof by theinitialization command “INIT_COM” and the initialization response“INIT_RES”, and it is possible to exchange messages while beinginstructed by the HCI if the version of the AP 21 is equivalent orhigher than the version of the CLF 22. On the other hand, if the versionof the AP 21 is lower than the version of the CLF 22, the AP 21 performserror processing such as an output of an error message.

FIG. 5 shows formats for the interface level setting command“SET_INTERFACE_LEVEL_COM” and the interface level setting response“SET_INTERFACE_LEVEL_RES”.

The interface level setting command “SET_INTERFACE_LEVEL_COM” is amessage for associating the RF protocol and the interface level. Theinterface level setting command “SET_INTERFACE_LEVEL_COM” includes thenumber [n] of interface level setting data items and n interface levelsetting data items.

The interface level setting data for one RF protocol includes “Mode”representing the mode (Poll mode/Listen Mode) of the target 11,“Protocol” representing the used RF protocol, and “Interface level”representing the used interface level. That is, it is possible to setthe interface level (“Interface level”) for each of the Poll Mode andthe Listen Mode for one RF protocol (“Protocol”). For example, settingcan be made such that the middle interface level is set for the case ofthe Poll Mode when the RF protocol is ISO-DEP and the high interfacelevel is set for the case of the Listen Mode when the RF protocol isISO-DEP. Accordingly, the number n of the interface level setting dataitems becomes twice as large as the number of the RF protocols at amaximum.

The interface level setting response “SET_INTERFACE_LEVEL_RES” is amessage for responding to the interface level setting command. Theinterface level setting response “SET_INTERFACE_LEVEL_RES” includesOK=1, or NG=0, which represents the response result, as a parameter.

FIG. 6 shows formats for the discovery start command“DISCOVER_START_COM”, the discovery start response “DISCOVER_START_RES”,the discovery stop command “DISCOVER_STOP_COM” and the discovery stopresponse “DISCOVER_STOP_RES”.

The discovery start command “DISCOVER_START_COM” is a message forrequesting the start of the detection of the target 11. The parameter ofthe discovery start command “DISCOVER_START_COM” includes “DiscoveryTypes” representing the RF technologies as detection targets, the numberof which corresponds to the number of the RF technologies which aredesired to be detected.

The discovery start response “DISCOVER_START_RES” is a message forresponding to the discovery start command. The discovery start response“DISCOVER_START_RES” includes OK=1 or NG=0, which represents theresponse result, as a parameter.

The discovery stop command “DISCOVER_STOP_COM” is a message forrequesting the detection of the target 11 to be stopped. The discoverystop command “DISCOVER_STOP_COM” does not include any parameters.

The discovery stop response “DISCOVER_STOP_RES” is a message forresponding to the discovery stop command. The discovery stop response“DISCOVER_STOP_RES” includes OK=1 or NG=0, which represents the responseresult, as a parameter.

FIG. 7 shows formats for the discovery selection command“DISCOVER_SELECT_COM”, the discovery selection response“DISCOVER_SELECT_RES”, the deactivation command “DEACT_COM”, and thedeactivation response “DEACT_RES”.

The discovery selection command “DISCOVER_SELECT_COM” is a message forselecting the RF technology (target 11) and the RF protocol. A selectedRF technology (target 11) is input in the parameter “Target ID”, and aselected RF protocol is input to the parameter “Target SAP” of thediscovery selection command “DISCOVER_SELECT_COM”.

The discovery selection response “DISCOVER_SELECT_RES” is a message forresponding to the discovery selection command. The discovery selectionresponse “DISCOVER_SELECT_RES” includes OK=1 or NG=0, which representsthe response result, as a parameter.

The deactivation command “DEACT_COM” is a message for requesting thecompletion of the data exchange with the target 11. The deactivationcommand “DEACT_COM” includes “Target ID” corresponding to the RFtechnology, “Target SAP” corresponding to the RF protocol, and“Deactivation Type” which is the command to be sent to the target, asparameters.

The deactivation response “DEACT_RES” is a message for responding to thedeactivation command “DEACT_COM”. The deactivation response “DEACT_RES”includes OK=1 or NG=0, which represents the response result, as aparameter.

FIG. 8 shows formats for the discovery notification “DISCOVER NTF”, theactivation notification “ACT_NTF”, and the deactivation notification“DEACT_NTF”.

The discovery notification “DISCOVER_NTF” is a message for thenotification of the target, and the RF technology and the RF protocolthereof. There are a plurality of combinations of the target, the RFtechnology, and the RF protocol in some cases in the same manner as inthe aforementioned discovery selection command “DISCOVER_SELECT_COM”.

The discovery notification “DISCOVER_NTF” includes “Target ID” which isthe number allotted by the CLF 22 to the RF technology, “Target SAP”which is the number allotted by the CLF 22 to the RF protocol,“Discovery Type” representing the detected RF technology, “RF Protocol”representing the RF protocol of the target 11, the “Technology SpecificParameters” representing the RF technology specific parameter, and“More” representing the presence of the next discovery notification“DISCOVER_NTF”, as parameters.

The activation notification “ACT_NTF” is a message for the notificationof the activation (activating, starting) of a specific interface level(activation, start). The activation notification “ACT_NTF” includes“Activation Parameters” representing the activation parameters and“Interface Type” representing the activated interface level as well asthe aforementioned “Target ID”, “Target SAP”, “Discovery Type”, and “RFprotocol”, as parameters.

The deactivation notification “DEACT_NTF” is a message for thenotification of the deactivation (deactivating) of a specific interfacelevel. The deactivation notification “DEACT_NTF” includes “DeactivationParameters” representing the deactivation parameters as well as theaforementioned “Target ID” and “Target SAP”, as parameters.

FIG. 9 shows a list of messages described with reference to FIGS. 4 to8.

[Sequence Outline]

Next, description will be made of the outline of the sequence performedbetween the AP 21 and the CLF 22 when the AP 21 exchanges data with thetarget 11 with reference to FIG. 10.

The sequence performed between the AP 21 and the CLF 22 when the AP 21exchanges data with the target 11 roughly includes the following fivesteps.

(1) Initialization processing for setting interface level for RFprotocol

(2) Discovery processing for target 11

(3) Activation processing for interface

(4) Data exchange processing

(5) Deactivation processing for interface

When the AP 21 exchanges data with a plurality of targets 11, the stepsfrom (3) to (5) are sequentially executed for each of the plurality oftarget 11.

(1) Initialization Processing for Setting Interface Level for RFProtocol

In the initialization processing, the AP 21 designates (notifies of) theinterface level associated with an RF protocol by sending the interfacelevel setting command “SET_INTERFACE_LEVEL_COM” after checking theinterface ability of the CLF 22. The initialization processingcorresponds to the processing in Step S11 of the AP 21 and theprocessing in Step S21 of the CLF 22 in FIG. 10.

(2) Discovery Processing for Target 11

The discovery processing is processing for detecting the target 11. Ifthe AP 21 sends the discovery start command “DISCOVER_START_COM” forrequesting the start of the detection of the target 11 to the CLF 22 inStep S12, the CLF 22 starts the processing of detecting the target 11 inStep S22.

In the detection of the target 11, the CLF 22 alternately repeats thePoll Mode and the Listen Mode. That is, the CLF 22 repeats processing ofsetting the polling command and waiting for the response from thecounterpart (Poll Mode) and processing of waiting for the pollingcommand from the counterpart (Listen Mode) thereafter.

In the Poll Mode, if the CLF 22 receives a response for the sent pollingcommand, the communication link with the target 11 is regarded to havebeen established, and the mode at that time (Poll Mode) is maintained.In the Poll Mode, the CLF 22 can act as a PCD or an Initiator and send acommand.

On the other hand, in the Listen Mode, if the CLF 22 sends a response tothe polling command from the counterpart, the communication link withthe target 11 is regarded to have been established, and the mode at thattime (Listen Mode) is maintained. In the Listen Mode, the CLF 22 can actas a PICC or a Target and respond to the received command (send theresponse).

The CLF 22 notifies the AP 21 of the detected target 11 by the discoverynotification “DISCOVER_NTF” in Step S23. When a plurality of targets 11are detected, the CLF 22 sends the discovery notification “DISCOVER_NTF”for each of all detected targets 11.

(3) Activation Processing for Interface

The AP 21 receives the discovery notification “DISCOVER_NTF”, thenselects one predetermined target 11 from among the received targets, andsends the discovery selection command “DISCOVER_SELECT_COM” to the CLF22 in Step S13.

The CLF 22 receives the discovery selection command“DISCOVER_SELECT_COM” and activates the interface of the one selectedtarget 11 based on the discovery selection command “DISCOVER_SELECT_COM”in Step S24. Then, the CLF 22 notifies the AP 21 of the fact that theinterface of the target 11 selected by the discovery selection command“DISCOVER_SELECT_COM” has been activated, by the activation notification“ACT_NTF”.

In addition, this processing is processing in the case of the Poll Mode,and different processing is performed in the case of the Listen Modesince the AP21 does not select the target 11. That is, the CLF 22responds with a plurality of RF technologies in the Listen Mode when theCLF 22 retains a state machine for the plurality of RF technologies. TheCLF 22 responds with the RF technology detected first when the CLF 22retains a state machine for one RF technology. The CLF 22 activates theinterface of the responding target 11 and notifies the AP 21 of the factby the activation notification “ACT_NTF”. Since the target 11 sends acommand in the Listen Mode, the CLF 22 performs processing in accordancewith the received command.

(4) Data Exchange Processing

The AP 21 receives the activation notification “ACT_NTF” from the CLF 22and then activates the application in Step S14. At this time, the AP 21selects one of the applications App (H), App (M), and App (L) inaccordance with the interface level of the CLF 22.

The AP 21 exchanges data with the target 11 through the CLF 22 by theactivated application in Step S15. The CLF 22 exchanges data between theAP 21 and the target 11 in Step S25.

(5) Deactivation Processing for Interface

In the Poll Mode, the application activated in the AP 21 sends thedeactivation command “DEACT_COM” to the CLF 22 at the time of thecompletion of the application. The CLF 22 receives the deactivationcommand “DEACT_COM”, deactivates the interface of the communicatingtarget 11, and disconnects the communication link with the target 11 inStep S26.

On the other hand, the CLF 22 sends the deactivation notification“DEACT_NTF” to the AP 21 after the disconnection of the communicationlink with the communicating target 11 in the Listen Mode. The AP 21completes the application when the deactivation notification “DEACT_NTF”is received in Step S16.

The rough sequence flow has been described above for the example inwhich communication is performed by one target 11.

[Detailed Example of Sequence (in the Case of Poll Mode)]

Hereinafter, detailed description will be made of the sequence performedbetween the AP 21 and the CLF 22 when the AP 21 exchanges data with aplurality of targets 11 with reference to FIGS. 11 to 13.

FIG. 11 shows the RF technology and the RF protocol supported by each ofthe targets 11-1 to 11-3.

The target 11-1 supports NFC-A as the RF technology and two RF protocolsincluding ISO-DEP and NFC-DEP. The target 11-2 supports NFC-B as the RFtechnology and ISO-DEP as the RF protocol. The target 11-3 supports theNFC-F as the RF technology and T3T as the RF protocol.

In FIG. 11, “Target ID” and “Target SAP” shown in the right side of thesection for the RF protocol represent identifiers allotted to thedetected target 11 by the CLF 22 in a series of sequence shown in FIGS.12 and 13.

[Sequence Example for Poll Mode]

FIGS. 12 and 13 are flowcharts showing a sequence in which the NFCdevice 1 (CLF 22) is operated in the Poll Mode to communicate with threetargets 11-1 to 11-3 with different RF technologies.

First, the AP 21 sends an initialization command INIT_COM in Step S41,and the CLF 22 sends an initialization response INIT_RES as a responseto the AP 21 in Step S42. The initialization response INIT_RES includesan interface level for each RF protocol supported by the CLF 22 asdescribed above.

In Step S43, the AP 21 sends an interface level setting commandSET_INTERFACE_LEVEL_COM for associating the RF protocol and theinterface level to the CLF 22 based on the interface level for each RFprotocol supported by the CLF 22. In Step S43, SET_INTERFACE_LEVEL_COM(5, Poll, ISO-DEP Protocol, Mid I/F Level, Poll, NFC-DEP Protocol, HighI/F Level, Poll, T1T Protocol, Low I/F Level, Poll, T2T Protocol, LowI/F Level, Poll, T3T Protocol, Low I/F Level) is sent. With such acommand, the middle interface level is set when the RF protocol isISO-DEP, the high interface level is set for NFC-DEP, and the lowinterface level is set for T1T, T2T, and T3T in the CLF 22 in the PollMode.

Although setting is made for the RF protocols T1T, T2T, and T3T in thisexample, the levels of the RF protocols T1T, T2T, and T3T may be fixedto the low level, and the sending of the command and the setting may beomitted since only the low interface level can be set for the RFprotocols T1T, T2T, and T3T.

Since the sequence of FIG. 12 describes an example in which the NFCdevice 1 (CLF 22) is operated in the Poll Mode, the designation of eachinterface level in the Listen Mode is omitted in the interface levelsetting command SET_INTERFACE_LEVEL_COM in Step S43.

The CLF 22 sends an interface level setting responseSET_INTERFACE_LEVEL_RES which represents that the interface levelsetting command SET_INTERFACE_LEVEL_COM from the AP 21 has beenunderstood in Step S44.

Then, the AP 21 designates NFC-A, NFC-B, and NFC-F as the RFtechnologies of the detection targets and sends a discovery startcommand DISCOVER_START_COM to the CLF 22 in Step S45. The CLF 22 sends adiscovery start response DISCOVER_START_RES representing that thediscovery start command DISCOVER_START_COM has been understood to the AP21 in Step S46.

Then, the CLF 22 sends a command for detecting the targets 11 for NFC-A,NFC-B, and NFC-F designated as the RF technologies of the detectiontargets. Specifically, the AP 21 sends a command SENS_REQ for NFC-A inStep S47 and receives a response SENS_RES for the command SENS_REQ whichis sent from the target 11-1 in the RF field in Step S48. The RFprotocol of the target 11-1 is not yet known at the time of receivingthe response SENS_RES.

In addition, the AP 21 sends a command SENSB_REQ for NFC-B in Step S49and receives a response SENSB_RES for the command SENSB_REQ which issent from the target 11-2 in the RF field in Step S50. The fact that theRF protocol of the target 11-2 is ISO-DEP is known by receiving theresponse SENSB_RES.

Moreover, the AP 21 sends a command SENSF_REQ for NFC-F in Step S51 andreceives a response SENSF_RES for the command SENSF_REQ which is sentfrom the target 11-3 in the RF field in Step S52. The fact that the RFprotocol of the target 11-3 is T3T is known by receiving the responseSENSF_RES.

Although the CLF 22 alternately repeats the Poll Mode and the ListenMode if no target 11 is detected, the operation in the Listen Mode isnot performed since the targets 11-1 to 11-3 are detected in the PollMode.

The CLF 22 sends three discovery notifications DISCOVER_NTF for thenotification of the detected targets 11-1 to 11-3 to the AP 21 in StepsS53 to S55. Specifically, the CLF 22 allots “TID1” as the Target ID and“TSAP1” as the Target SAP for the detected target 11-1 of NFC-A andsends a discovery notification DISCOVER_NTF to the AP 21 in Step S53.

The CLF 22 allots “TID2” as the Target ID and “TSAP2” as the Target SAPfor the detected target 11-2 of NFC-B and sends a discovery notificationDISCOVER_NTF to the AP 21 in Step S54. The CLF 22 allots “TID3” as theTarget ID and “TSAP3” as the Target SAP for the detected target 11-3 ofNFC-F and sends a discovery notification DISCOVER_NTF to the AP 21 inStep S55.

Here, the last parameters “More” of the discovery notificationsDISCOVER_NTF sent in Steps S53 and S54 are “1” since the discoverynotification DISCOVER_NTF will be sent again. On the other hand, thelast parameter “More” of the discovery notification DISCOVERY NTF sentin Step S55 is “0” since no discovery notification DISCOVER_NTF will besent again.

In the following sequence, the target 11 is specified by the Target IDand the Target SAP allotted by the CLF 22, and messages are exchangedbetween the AP 21 and the CLF 22.

The AP 21 selects communication with the target 11-2 from among thedetected targets 11-1 to 11-3 and sends a discovery selection commandDISCOVER_SELECT_COM with parameters of TID2 for “Target ID” and TSAP2for “Target SAP” in Step S56.

The CLF 22 receives the discovery selection command DISCOVER_SELECT_COMand sends a discovery selection response DISCOVER_SELECT_RESrepresenting that the command has been understood to the AP 21 in StepS57.

The middle interface level is designated by the aforementioned interfacelevel setting command SET_INTERFACE_LEVEL_COM for the RF protocol ofISO-DEP represented by “Target SAP”=TSAP2 included in the discoveryselection command DISCOVER_SELECT_COM. The protocol activation is theprocessing performed by the CLF 22 in the middle interface level asdescribed above with reference to FIG. 3.

Thus, the CLF 22 performs the protocol activation in Step S58. That is,the CLF 22 informs of its own attributes (specifications) and sends anATTRIB command for requesting the attributes of the target 11-2 to thetarget 11-2. The CLF 22 receives a response ATTA from the target 11-2 asa response for the ATTRIB command in Step S59.

If the response ATTA is received, the CLF 22 sends an activationnotification ACT_NTF representing the fact that the activation of theinterface in the middle interface level has been completed to the AP 21in Step S60. The parameters of the activation notification ACT_NTFinclude a received response “ATTA” as “Activation Parameter” and “MidI/F Level activated” representing the activated interface level as“Interface Type”.

After the completion of the interface activation, the application App(M) corresponding to the middle interface level in the AP 21 is startedto exchange data between the AP 21 and the target 11-2 (TID2) with theuse of the RF protocol ISO-DEP (TSAP2) in Step S61.

When predetermined data exchange is performed, and the application App(M) is completed, the AP 21 sends a deactivation command DEACT_COM tothe CLF 22 in Step S62. The parameter “Deactivation Type” of thedeactivation command DEACT_COM includes a command “DESELECT” to be sentto the target 11-2.

The CLF 22 sends a deactivation response DEACT_RES representing the factthat the deactivation command DEACT_COM has been understood to the AP 21in Step S63.

Then, the CLF 22 sends a DESELECT command to the target 11-2 based onthe parameter “Deactivation Type” included in the deactivation commandDEACT_COM in Step S64. The CLF 22 receives the response DESELECT fromthe target 11-2 and deactivates the interface in Step S65. Theparameters relating to the target 11-2 (TID2) and ISO-DEP (TSAP2) arereleased by the deactivation of the interface.

From Step S66 in FIG. 13, the target 11-1 (TID1) is selected as acommunication counterpart, and communication is performed between the AP21 and the target 11-1 (TID1).

That is, the AP 21 sends a discovery selection commandDISCOVER_SELECT_COM with parameters of TID1 as “Target ID” and TSAP1 as“Target SAP” to the CLF 22 in Step S66.

The CLF 22 receives the discovery selection command DISCOVER_SELECT_COMand sends a discovery selection response DISCOVER_SELECT_RESrepresenting that the command has been understood to the AP 21 in StepS67.

Then, the CLF 22 recognizes a predetermined PICC and performsanticollision processing for communication even if a plurality of PICCs(IC cards) exist between the CLF 22 and the target 11-1 corresponding tothe parameter TID1 and the TSAP1, in Step S68.

In Step S69, the CLF 22 receives a response SEL_RES (ISO-DEP|NFC-DEP)representing that ISO-DEP and NFC-DEP are supported as the RF protocolsfrom the target 11-1.

The CLF 22 allots “TSAP4” as the Target SAP for the RF protocol ISO-DEPand “TSAP5” as the Target SAP for the RF protocol NFC-DEP, and sendsdiscovery notifications DISCOVER_NTF to the AP 21 in Steps S70 and S71.That is, the CLF 22 sends a discovery notification DISCOVER_NTF (TID1,TSAP4, NFC-A, PROTOCOL_ISO_DEP, SEL_RES, More=1) to the AP 21 in StepS70 and sends a discovery notification DISCOVER_NTF (TID1, TSAP5, NFC-A,PROTOCOL_NFC_DEP, SEL_RES, More=0) to the AP 21 in Step S71.

The AP 21 selects NFC-DEP from among the two RF protocols and sends adiscovery selection command DISCOVER_SELECT_COM with parameters TID1 as“Target ID” and TSAP5 as “Target SAP” in Step S72.

In Step S73, the CLF 22 receives the discovery selection commandDISCOVER_SELECT_COM and sends a discovery selection responseDISCOVER_SELECT_RES representing that the command has been understood tothe AP 21.

The high interface level is designated for the RF protocol NFC-DEP inthe aforementioned interface level setting in Step S43. Thus, the CLF 22performs protocol activation (ATR_REQ command for requesting attributes)and LLCP activation in Step S74.

In Step S75, the CLF 22 receives the results of the response ATR_RES andthe LLCP activation as a response to the ATR_REQ command from the target11-1. Then, the CLF 22 sends an activation notification ACT_NTFrepresenting the fact that the interface activation in the high levelhas been completed to the AP 21 in Step S76. The parameters of theactivation notification ACT_NTF include received response “ATR_RES” as“Activation Parameter” and “High I/F Level activate” representing theactivated interface level as “Interface Type”.

After the completion of the interface activation, the application App(H) corresponding to the high interface level in the AP 21 is started toexchange data between the AP 21 and the target 11-1 (TID1) with the useof the RF protocol NFC-DEP (TSAP5) in Step S77.

When predetermined data exchange is performed, and the application App(H) is completed, the AP 21 sends a deactivation command DEACT_COM tothe CLF 22 in Step S78. The parameter “Deactivation Type” of thedeactivation command DEACT_COM includes a command “DSL REQ” to be sentto the target 11-1.

The CLF 22 sends a deactivation response DEACT_RES representing the factthat the deactivation command DEACT_COM has been understood to the AP 21in Step S79.

Then, the CLF 22 sends a DSL REQ command to the target 11-1 based on theparameter “Deactivation Type” included in the deactivation commandDEACT_COM in Step S80. The CLF 22 receives the response DSL_RES from thetarget 11-1 and deactivates the interface in Step S81. The parametersrelating to the target 11-1 (TID1) and NFC-DEP (TSAP5) are released bythe deactivation of the interface.

From Step S82, the target 11-3 (TID3) is selected as a communicationcounterpart, and communication is performed between the AP 21 and thetarget 11-3 (TID3).

Specifically, the AP 21 sends a discovery selection commandDISCOVER_SELECT_COM with parameters of TID3 (NFC-F) as “Target ID” andTSAP3 (T3T) as “Target SAP” to the CLF 22 in Step S82.

The CLF 22 receives the discovery selection command DISCOVER_SELECT_COMand sends a discovery selection response DISCOVER_SELECT_RESrepresenting that the command has been understood to the AP 21 in StepS83.

The low interface level is designated for the RF protocol T3T in theaforementioned interface level setting in Step S43. No protocolactivation is performed in the low interface level. Therefore, the CLF22 immediately sets “NULL” for the parameter of “Activation Parameters”and sends an activation notification ACT_NTF representing that theinterface activation in the low level has been completed to the AP 21 inStep S84.

After the completion of the interface activation, the application App(L) corresponding to the low interface level in the AP 21 is started toexchange data between the AP 21 and the target 11-3 (TID3) with the useof the RF protocol T3T (TSAP3) in Step S85.

When predetermined data exchange is preformed, and the application App(L) is completed, the AP 21 sends a deactivation command DEACT_COM tothe CLF 22 in Step S86. Since no protocol deactivation is performed inthe same manner as the protocol activation, the parameter “DeactivationType” of the deactivation command DEACT_COM is “NULL”.

The CLF 22 sends a deactivation response DEACT_RES representing the factthat the deactivation command DEACT_COM has been understood to the AP 21in Step S87. Thereafter, the CLF 22 deactivates the interface andreleases the parameters relating to the target 11-3 (TID3) and T3T(TSAP3).

As described above, the NFC device 1 (the AP 21 and the CLF 22) can beoperated as a polling device and detect a plurality of targets 11 withdifferent RF protocols. In addition, the NFC device 1 can sequentiallyexchange data with a plurality of detected targets 11.

[Detailed Example of Sequence (in the Case of Listen Mode)]

Next, description will be made of a sequence in which the NFC device 1is operated in the Listen Mode with reference to FIGS. 14 and 15.

In the examples of FIGS. 14 and 15, the RF protocol supported by thetarget 11-3 is NFC-DEP, unlike the example in FIG. 11.

First, the AP 21 sends an initialization command INIT_COM in Step S101,and the CLF 22 sends an initialization response INIT_RES as a responseto the AP 21 in Step S102. The initialization response INIT_RES includesan interface level for each RF protocol supported by the CLF 22 asdescribed above.

The AP 21 sends an interface level setting commandSET_INTERFACE_LEVEL_COM for associating between the RF protocol and theinterface level to the CLF 22 based on the interface level for each RFprotocol supported by the CLF 22 in Step S103. In the example of FIG.14, SET_INTERFACE_LEVEL_COM (2, Listen, ISO-DEP Protocol, Mid I/F Level,Listen, NFC-DEP Protocol, High I/F Level) is sent, and the middle levelis designated for the RF protocol ISO-DEP and the high level isdesignated for NFC-DEP in the Listen Mode. Since the level of the RFprotocols T1T, T2T, and T3T are fixed to the low level, the designationthereof is omitted. In addition, each interface level in the Poll Modeis also omitted.

The CLF 22 sends an interface level setting responseSET_INTERFACE_LEVEL_RES representing that the interface level settingcommand SET_INTERFACE_LEVEL_COM from the AP 21 has been understood tothe AP 21 in Step S104.

In Step S105, the AP 21 designates NFC-A, NFC-B, and NFC-F as the RFtechnologies of the detection targets and sends a discovery startcommand DISCOVER_START_COM to the CLF 22. The CLF 22 sends a discoverystart response DISCOVER_START_RES representing that the discovery startcommand DISCOVER_START_COM has been understood to the AP 21 in StepS106.

Then, the CLF 22 firstly sends a polling command for operating the NFCdevice 1 in the Poll Mode for NFC-A, NFC-B, and NFC-F designated as theRF technologies of the detection targets. Specifically, the CLF 22sequentially sends commands SENS_REQ, SENSB_REQ, and SENSF_REQ foroperating the NFC device 1 in the Poll mode in Steps S107 to S109.

Since the responses for the commands SENS_REQ, SENSB_REQ, and SENSF_REQhave not been received, the CLF 22 then detects the polling command foroperating the NFC device 1 in the Listen Mode and responds.

Specifically, the CLF 22 receives the command SENS_REQ sent from thetarget 11-1 in Step S110 and sends the response SENS_RES to the target11-1 in Step S111.

In addition, the CLF 22 receives the command SENSB_REQ sent from thetarget 11-2 in Step S112 and sends the response SENSB_RES to the target11-2 in Step S113.

Furthermore, the CLF 22 receives the command SENSF_REQ sent from thetarget 11-3 in Step S114 and sends the response SENSF_RES to the target11-3 in Step S115.

In Step S116, the CLF 22 sends a response SRL_RES (ISO-DEP & NFC-DEP)representing that ISO-DEP and NFC-DEP are supported as the RF protocolsto the target 11-1 detected first.

Since the middle or higher interface level is designated for RFprotocols ISO-DEP and NFC-DEP of the target 11-1, the CLF 22 waits forthe protocol activation by the target 11-1. Then, the CLF 22 receives aRATS (Request for Answer To Select) for requesting for ATS from thetarget 11-1 in Step S117 and sends an ATS response for the command tothe target 11-1 in Step S118. With such operations, the protocolactivation by the RF protocol ISO-DEP is completed.

After receiving the RATS command, the CLF 22 sends an activationnotification ACT_NTF (TID1, TSAP1, NFC-A, PROTOCOL_ISO_DEP, ATS, Mid I/FLevel activated) representing that the interface activation has beencompleted to the AP 21 in Step S119.

In Step S120, the application App (M) corresponding to the middleinterface level in the AP 21 is started to exchange data between the AP21 and the target 11-1 (TID1) with the use of the RF protocol ISO-DEP(TSAP1).

After the predetermined data exchange has been performed, the CLF 22receives a command DESELECT from the target 11-1 as a PCD (readerwriter) in Step S121 and sends a DESELECT response to the target 11-1 inStep S122. With such operations, the interface with the use of the RFprotocol ISO-DEP is deactivated in the CLF 22.

Then, the CLF 22 sends a deactivation notification DEACT_NTF to the AP21 with the parameters of TID1 as “Target ID”, TSAP1 as “Target SAP”,and DESELECT as “Deactivation Parameter” in Step S123. The AP 21receives the deactivation notification DEACT_NTF and then completes theapplication App (M).

Although data exchange is then performed with the target 11-2, which hasbeen secondly detected, for which allocation has been made such that“Target ID”=TID2 and “Target SAP”=TSAP2, the description of theprocessing will be omitted.

Then, exchange is performed with the target 11-3, which has been thirdlydetected, for which allocation has been made such that “Target ID”=TID3and “Target SAP”=TSAP3.

In Step S124 in FIG. 15, the CLF 22 receives a command ATR_REQ forrequesting the attributes from the target 11-3. The high interface levelis designated for the RF protocol NFC-DEP in the aforementioned StepS103. Therefore, the CLF 22 sends the response ATR_RES as a response tothe command ATR_REQ and performs LLCP activation in Step S125.

After the protocol activation and the LLCP activation, the CLF 22 sendsan activation notification ACT_NTF to the AP 21 in Step S126. Theparameters of the activation notification ACT_NTF include the receivedresponse “ATR_RES” as “Activation Parameter” and “High I/F Levelactivated” representing the activated interface level as “InterfaceType”.

In Step S127, the application App (H) corresponding to the highinterface level in the AP 21 is started to exchange data between the AP21 and the target 11-3 (TID3) with the use of the RF protocol NFC-DEP(TSAP3).

After the predetermined data exchange, the CLF 22 receives a command DSLREQ from the target 11-3 as the initiator (reader writer) in Step S128and sends a response DSL_RES to the target 11-3 in Step S129. With suchoperations, the interface with the use of the RF protocol NFC-DEP isdeactivated in the CLF 22.

Then, the CLF 22 sends a deactivation notification DEACT_NTF to the AP21 in Step S130. Specifically, the CLF 22 sends a deactivationnotification DEACT_NTF with parameters of TID3 as “Target ID”, TSAP3 as“Target SAP”, and DSL REQ as “Deactivation Parameter”. The AP 21receives the deactivation notification DEACT_NTF and then completes theapplication App (H).

The NFC device 1 (the AP 21 and the CLF 22) can be operated as alistening device and detects a plurality of targets 11 with different RFprotocols. In addition, the NFC device 1 can sequentially exchange datawith the detected plurality of targets 11.

The NFC device 1 for the near field wireless communication based onISO/IEC 18092 or ISO/IEC 14443 is operated while being functionallydivided into the AP 21 and the CLF 22. The AP 21 mainly executes theapplication and performs overall control of the NFC device 1. The CLF 22is disposed between the AP 21 and the target 11 and mainly sends andreceives RF data with the target 11 (a PICC (IC card) of ISO/IEC 14443or a target of ISO/IEC 18092) through the antenna 24.

The AP 21 selects (designates) one interface level from among aplurality of interface levels supported by the CLF 22 for each RFprotocol and notifies the CLF 22. The plurality of interface levels areclassified depending on up to which level of processing the CLF 22positioned in between is burdened when the NFC device 1 exchanges datawith the target 11. Specifically, when the interface level is classifiedinto three stages including a low level, a middle level, and a highlevel, the amount of the processing allotted to the CLF 22 is thelargest at the high level, and the amount of the processing allotted tothe CLF 22 is the smallest at the low level. The AP 21 obtainsinformation regarding the interface level supported by the CLF 22 anddesignates a predetermined interface level for each RF protocol withrespect to the CLF 22. Then, the AP 21 activates and executes anapplication App at a level corresponding to the designated interfacelevel. With such a configuration, the AP can concentrate on theexecution of the application processing by allotting processing, whichcan be executed by the CLF 22, to the CLF 22. In addition, when the CLF22 supports a higher interface level, the CLF 22 and the AP 21 canexchange data at a higher interface level (data exchange in units inwhich the application of the AP 21 can more easily perform processing)by setting the interface level to be as high as possible. With such aconfiguration, the target 11 and the NFC DEVICE 1 can effectivelyexchange data.

When the CLF 22 is operated as a polling device, the CLF 22 sends apolling command, detects (discovers) a plurality of targets 11, and thennotifies the AP 21 of all detected targets 11 (discovery notificationDISCOVER_NTF). Then, a target 11 for communication is sequentiallyselected one by one by the AP 21 from among the plurality of detectedtargets 11, and communication (data execution by the application) isexecuted. With respect to each of the selected targets 11, operationsincluding interface activation, application execution in accordance withthe interface level (including start and completion), and interfacedeactivation are performed. With such operations, it is possible toeffectively exchange data with a plurality of targets 11 with differentRF technologies or RF protocols.

On the other hand, when the CLF 22 is operated as a listening device, atarget 11 is selected as a communication counterpart from among aplurality of targets 11, with which a communication link has beenestablished, in the detection order. The CLF 22 activates the interfacecorresponding to the RF protocol of the selected target 11 and notifiesthe AP 21 (activation notification ACT_NTF). The AP 21 executes(including start and completion) the application in accordance with theinterface level of the target 11 for which the activation notificationhas been made. Accordingly, communication (data exchange by theapplication) with the plurality of targets 11 with which a communicationlink has been established is sequentially executed. With such aconfiguration, it is possible to effectively exchange data with aplurality of targets 11 with different RF technologies or RF protocols.

The above description was made of an example in which the processingnecessary for the data communication between the target 11 and the AP 21is performed by CLF 22 instead in accordance with the interface leveldesignated for a predetermined RF protocol.

However, the CLF 22 performs processing to be performed by the AP 21instead of the AP 21 in accordance with the interface level designatedfor a predetermined RF protocol in the data exchange processing betweenthe target 11 and the AP 21, in some cases.

For example, if the NFC device 1 is in a reader/writer mode, and theinterface level activated by the CLF 22 is the high level, the CLF 22performs the processing for accessing the NDEF data instead of the AP21. Here, the NDEF data is data in a common data format NDEF (NFC DataExchange Format) used by applications.

Specific description will be made of an example of an NFC FORUM Type 3Tag Operation which is a specification of Type 3 from among the TagOperations defining a command for accessing the NDEF data. When the NDEFdata is read in the NFC FORUM Type 3 Tag Operation, PollingCommand/Response and Check Command/Response are exchanged between thetarget 11 and the NFC device 1. The exchange of Check Command/Responseis performed a plurality of times in some cases in accordance with theNDEF data size. When Check Command/Response has been exchanged aplurality of times, the data obtained by coupling the data obtained byCheck Command/Response exchanged the plurality of times becomes the NDEFdata.

When the interface level of the CLF 22 is the high level, the CLF 22voluntarily executes Polling Command/Response and Check Command/Responseonce or more. When Check Command/Response is exchanged a plurality oftimes, the CLF 22 couples the data obtained by exchanging CheckCommand/Response the plurality of times to generate NDEF data. On theother hand, the interface level of the CLF 22 is the middle or lowlevel, the CLF 22 only relays Polling Command/Response supplied from theAP 21 and Check Command/Response exchanged once or more. The AP 21 alsoperforms the processing of generating the NDEF data from the dataobtained by exchanging Check Command/Response the plurality of times.

The steps described in the flowchart may of course be executed in atime-series manner in the order described in this specification, orwithout executing the steps in the time-series manner, the steps may beexecuted in parallel or at a necessary timing such as by the timing ofcalling or the like.

In addition, the system in this specification represents the entireapparatus including a plurality of apparatuses.

The embodiments of the present disclosure are not limited to theaforementioned embodiments, and various modifications can be made withinthe range of the scope of the present disclosure.

For example, a program executed to perform a method according to someembodiments need not be stored in a non-transitory storage medium. Theprogram can also be stored in a transitory storage medium, such as apropagating wave.

What is claimed is:
 1. A communication device, comprising: firstprocessing circuitry; second processing circuitry; and interfacecircuitry between the first processing circuitry and the secondprocessing circuitry, wherein the first processing circuitry isconfigured to send a first command to the second processing circuitry,the second processing circuitry is configured to receive the firstcommand from the first processing circuitry and is configured to send afirst message to the first processing circuitry, the first processingcircuitry is configured to send a second command to the secondprocessing circuitry, the second processing circuitry is configured toreceive the second command from the first processing circuitry and toselect an interface capability, the first processing circuitry isconfigured to send a third command to the second processing circuitry,the second processing circuitry is configured to receive the thirdcommand and to detect an external target, the first processing circuitryis configured to send a fourth command to the second processingcircuitry, the second processing circuitry is configured to receive thefourth command, to activate the interface circuitry, and to send asecond message to the first processing circuitry, the first processingcircuitry is configured to start an application and to exchange datawith the external target, the first processing circuitry is configuredto send a fifth command to the second processing circuitry, and thesecond processing circuitry is configured to receive the fifth commandand to deactivate the activated interface circuitry.
 2. Thecommunication device of claim 1, wherein the first command is a commandto send a message identifying interface capabilities for radio frequencyprotocols supported by the second processing circuit.
 3. Thecommunication device of claim 1, wherein the second command is a commandto select an interface capability from among the identified interfacecapabilities.
 4. The communication device of claim 1, wherein the thirdcommand is a command to detect external targets.
 5. The communicationdevice of claim 1, wherein the fourth command is a command to activatethe interface circuitry.
 6. The communication device of claim 1, whereinthe fifth command is a command to deactivate the interface circuitry. 7.The communication device of claim 1, wherein the first message is amessage for identifying interface capabilities for radio frequencyprotocols supported by the second processing circuitry.
 8. Thecommunication device of claim 1, wherein the second message is a messagefor notification for a completion of activating the interface circuitry.9. A communication device, comprising: first processing circuitry:second processing circuitry; and interface circuitry between the firstprocessing circuitry and the second processing circuitry, wherein thefirst processing circuitry is configured to send a first command to thesecond processing circuitry, the second processing circuitry isconfigured to receive the first command from the first processingcircuitry and is configured to send a first message to the firstprocessing circuitry, the first processing circuitry is configured tosend a second command to the second processing circuitry, the secondprocessing circuitry is configured to receive the second command fromthe first processing circuitry and to select an interface capability,the first processing circuitry is configured to send a third command tothe second processing circuitry, the second processing circuitry isconfigured to receive the third command, detect an external target, toactivate the interface circuitry, and to send a second message to thefirst processing circuitry, the first processing circuitry is configuredto start an application and to exchange data with the external target,the first processing circuitry is configured to send a fourth command tothe second processing circuitry, and the second processing circuitry isconfigured to receive the fourth command and to deactivate the activatedinterface circuitry.
 10. The communication device of claim 9, whereinthe first command is a command to send a message identifying interfacecapabilities for radio frequency protocols supported by the secondprocessing circuitry.
 11. The communication device of claim 9, whereinthe second command is a command to select an interface capability fromamong the identified interface capabilities.
 12. The communicationdevice of claim 9, wherein the first message is a message foridentifying interface capabilities for radio frequency protocolssupported by the second processing circuitry.
 13. A method performedusing communication device having first processing circuitry, secondprocessing circuitry, and interface circuitry between the firstprocessing circuitry and the second processing circuitry, the methodcomprising: sending a first command from the first processing circuitryto the second processing circuitry; receiving the first command from thefirst processing circuitry at the second processing circuitry andsending a first message from the second processing circuitry to thefirst processing circuitry; sending a second command from the firstprocessing circuitry to the second processing circuitry; receiving thesecond command from the first processing circuitry at the secondprocessing circuitry and selecting an interface capability by the secondprocessing circuitry; sending a third command from the first processingcircuitry to the second processing circuitry; receiving the thirdcommand at the second processing circuitry and detecting an externaltarget, using the second processing circuitry; sending a fourth commandfrom the first processing circuitry to the second processing circuitry;receiving the fourth command at the second processing circuitry,activating the interface circuitry by the second processing circuitry,and sending a second message from the second processing circuitry to thefirst processing circuitry; starting, by the first processing circuitry,an application and exchanging data between the first processingcircuitry and the external target, sending a fifth command from thefirst processing circuitry to the second processing circuitry; andreceiving the fifth command at the second processing circuitry anddeactivating the activated interface circuitry by the second processingcircuitry.
 14. A method performed using a communication device havingfirst processing circuitry, second processing circuitry, and interfacecircuitry between the first processing circuitry and the secondprocessing circuitry, the method comprising: sending a first commandfrom the first processing circuitry to the second processing circuitry;receiving the first command from the first processing circuitry at thesecond processing circuitry and sending a first message from the secondprocessing circuitry to the first processing circuitry; sending a secondcommand from the first processing circuitry to the second processingcircuitry; receiving the second command from the first processingcircuitry at the second processing circuitry and selecting an interfacecapability using the second processing circuitry; sending a thirdcommand from the first processing circuitry to the second processingcircuitry; receiving the third command by the second processingcircuitry; detecting an external target by the second processingcircuitry; activating the interface circuitry by the second processingcircuitry; sending a second message from the second processing circuitryto the first processing circuitry; starting an application by the firstprocessing circuitry; exchanging data with the external target by thefirst processing circuitry; sending a fourth command from the firstprocessing circuitry to the second processing circuitry; receiving thefourth command by the second processing circuitry; and deactivating theactivated interface circuitry by the second processing circuitry.
 15. Anon-transitory, computer-readable medium storing instructions that, whenexecuted by a communication device having first processing circuitry,second processing circuitry, and interface circuitry between the firstprocessing circuitry and the second processing circuitry, control thecommunication device to carry out a method comprising: sending a firstcommand from the first processing circuitry to the second processingcircuitry; receiving the first command from the first processingcircuitry at the second processing circuitry and sending a first messagefrom the second processing circuitry to the first processing circuitry;sending a second command from the first processing circuitry to thesecond processing circuitry; receiving the second command from the firstprocessing circuitry at the second processing circuitry and selecting aninterface capability by the second processing circuitry; sending a thirdcommand from the first processing circuitry to the second processingcircuitry; receiving the third command at the second processingcircuitry and detecting an external target, using the second processingcircuitry; sending a fourth command from the first processing circuitryto the second processing circuitry; receiving the fourth command at thesecond processing circuitry, activating the interface circuitry by thesecond processing circuitry, and sending a second message from thesecond processing circuitry to the first processing circuitry; starting,by the first processing circuitry, an application and exchanging databetween the first processing circuitry and the external target, sendinga fifth command from the first processing circuitry to the secondprocessing circuitry; and receiving the fifth command at the secondprocessing circuitry and deactivating the activated interface circuitryby the second processing circuitry.
 16. A non-transitory,computer-readable medium storing instructions that, when executed by acommunication device having first processing circuitry, secondprocessing circuitry, and interface circuitry between the firstprocessing circuitry and the second processing circuitry, control thecommunication device to carry out a method comprising: sending a firstcommand from the first processing circuitry to the second processingcircuitry; receiving the first command from the first processingcircuitry at the second processing circuitry and sending a first messagefrom the second processing circuitry to the first processing circuitry;sending a second command from the first processing circuitry to thesecond processing circuitry; receiving the second command from the firstprocessing circuitry at the second processing circuitry and selecting aninterface capability using the second processing circuitry; sending athird command from the first processing circuitry to the secondprocessing circuitry; receiving the third command by the secondprocessing circuitry; detecting an external target by the secondprocessing circuitry; activating the interface circuitry by the secondprocessing circuitry; sending a second message from the secondprocessing circuitry to the first processing circuitry; starting anapplication by the first processing circuitry; exchanging data with theexternal target by the first processing circuitry; sending a fourthcommand from the first processing circuitry to the second processingcircuitry; receiving the fourth command by the second processingcircuitry; and deactivating the activated interface circuitry by thesecond processing circuitry.